﻿#region Namespace References

using System;

#endregion

namespace DynConDevCorp.OpenArch.SmartData.Interfaces.EventArgClasses
{
    /// <summary>
    /// Argument class passed with CollectionChanged event.
    /// </summary>
    public class CollectionChangedEventArgs : EffectEventArgs
    {
        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="CollectionChangedEventArgs"/> class.
        /// </summary>
        /// <param name="changeType">Type of the change.</param>
        /// <param name="item">The item.</param>
        public CollectionChangedEventArgs(CollectionChangeType changeType, ISmartEntity item)
            : base(EffectCauses.CollectionContentChanged, null)
        {
            ChangeType = changeType;
            Item = item;
        }

        #endregion

        #region Public Instance Properties

        /// <summary>
        /// Type of change which has occured <see cref="CollectionChangeType"/>.
        /// </summary>
        /// <value>The type of the change.</value>
        public CollectionChangeType ChangeType { get; private set; }

        /// <summary>
        /// Gets or sets the item.
        /// </summary>
        /// <value>The item.</value>
        public ISmartEntity Item { get; private set; }

        #endregion
    }
}